bitkeeper revision 1.1159.1.276 (417d6277RUrjgN8Byhbusyfr7nmjbw)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Mon, 25 Oct 2004 20:30:47 +0000 (20:30 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Mon, 25 Oct 2004 20:30:47 +0000 (20:30 +0000)
mkbuildtree:
  Prevent disaster when tree to xenify doesn't exist.

linux-2.6.9-xen-sparse/mkbuildtree

index f932b92d41496f8b929bc81b5b96f146cc86c3d2..20513e6ead44a6049c6ff53d610ace1c1e544bc7 100755 (executable)
@@ -78,7 +78,7 @@ relative_lndir ()
 
 # Get absolute path to the destination directory
 pushd . >/dev/null
-cd ${1}
+cd ${1} || { echo "cannot cd to ${1}"; exit 1; }
 AD=$PWD
 popd >/dev/null
   
@@ -93,7 +93,7 @@ RS=$DESTPATH
 for i in `find . -type f -o -type l` ; do rm -f ${AD}/${i#./} ; done
 
 # We now work from the destination directory
-cd ${AD}
+cd ${AD} || { echo "cannot cd to ${AD}"; exit 1; }
 
 # Remove old symlinks
 for i in `find . -type l`; do rm -f $i; done